<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = ["张三","李四","王五"] ; 
        {
            //forEach
            arr.forEach(function( item , key , arr ) {
                console.log(item,key,arr);
            })
        }
        {
            let res = arr.map(function ( item , key , arr ){
                return arr ; 
            })
            console.log(res);
        }
        {
            let res = arr.filter(function( item , key , arr ){
                return item[0] == "张" ; 
            })
            console.log(res);
        }
    </script>
</body>
</html>